package org.sja.log2traffic.dataStructures;

import java.io.File;

import org.sja.log2traffic.IDateTimeFormatter;
import org.sja.log2traffic.ILogDataModyficator;


public class ConfigurationEntity {
	
	private IDateTimeFormatter dataCalculator;
	private Long from;
	private Long to;
	private String name;
	private ChartPeriodEnum chartPeriodEnum;
	private String trafficEnvironment;
	private Class<? extends ILogDataModyficator> logLineParserClass;
	private String logFileNameStartWith;
	private Integer amountOfHoursOnHoursChart;
	private Integer amountOfDaysOnDaysChart;
	private Integer amountOfWeeksOnWeeksChart;
	private Integer amountOfMonthsOnMonthsChart;
	
	private File outputDirectory;
	private File rootOutputDirectory;
	private File[] inputDirectories;
	
	public ConfigurationEntity(String name, IDateTimeFormatter dataCalculator, ChartPeriodEnum chartPeriodEnum){
		this.dataCalculator = dataCalculator;
		this.name = name;
		this.chartPeriodEnum = chartPeriodEnum;
	}
	
	public Long getFrom(){
		return from;
	}

	public Long getTo(){
		return to;
	}

	public void setFrom(Long from) {
		this.from = from;
	}

	public void setTo(Long to) {
		this.to = to;
	}

	public String getPeriodAsString() {
		return dataCalculator.longToStringCondendensed(getFrom()) + '-' + dataCalculator.longToStringCondendensed(getTo());
	}
	
	public String getFromAsFormattedString() {
		return dataCalculator.longToStringWithMinutes(getFrom());
	}	

	public String getToAsFormattedString() {
		return dataCalculator.longToStringWithMinutes(getTo());
	}	
	
	
	public File getOutputDirectory() {
		return outputDirectory;
	}

	public void setOutputDirectory(File outputdirectory) {
		this.outputDirectory = outputdirectory;
	}

	public File[] getInputDirectories() {
		return inputDirectories;
	}

	public void setInputDirectories(File[] inputDirectories) {
		this.inputDirectories = inputDirectories;
	}

	public String getName() {
		return name;
	}

	public ChartPeriodEnum getChartPeriodEnum() {
		return chartPeriodEnum;
	}

	public String getTrafficEnvironment() {
		return trafficEnvironment;
	}

	public void setTrafficEnvironment(String trafficEnvironment) {
		this.trafficEnvironment = trafficEnvironment;
	}

	public Class<? extends ILogDataModyficator> getLogLineParserClass() {
		return logLineParserClass;
	}

	public void setLogLineParserClass(Class<? extends ILogDataModyficator> logLineParserClass) {
		this.logLineParserClass = logLineParserClass;
	}

	public String getLogFileNameStartWith() {
		return logFileNameStartWith;
	}

	public void setLogFileNameStartWith(String logFileNameStartWith) {
		this.logFileNameStartWith = logFileNameStartWith;
	}

	public Integer getAmountOfHoursOnHoursChart() {
		return amountOfHoursOnHoursChart;
	}

	public void setAmountOfHoursOnHoursChart(Integer amountOfHoursOnHoursChart) {
		this.amountOfHoursOnHoursChart = amountOfHoursOnHoursChart;
	}

	public Integer getAmountOfDaysOnDaysChart() {
		return amountOfDaysOnDaysChart;
	}

	public void setAmountOfDaysOnDaysChart(Integer amountOfDaysOnDaysChart) {
		this.amountOfDaysOnDaysChart = amountOfDaysOnDaysChart;
	}

	public Integer getAmountOfWeeksOnWeeksChart() {
		return amountOfWeeksOnWeeksChart;
	}

	public void setAmountOfWeeksOnWeeksChart(Integer amountOfWeeksOnWeeksChart) {
		this.amountOfWeeksOnWeeksChart = amountOfWeeksOnWeeksChart;
	}

	public Integer getAmountOfMonthsOnMonthsChart() {
		return amountOfMonthsOnMonthsChart;
	}

	public void setAmountOfMonthsOnMonthsChart(Integer amountOfMonthsOnMonthsChart) {
		this.amountOfMonthsOnMonthsChart = amountOfMonthsOnMonthsChart;
	}

	public File getRootOutputConfigurationDirectory() {
		return rootOutputDirectory;
	}

	public void setRootOutputConfigurationDirectory(File rootOoutputConfigurationDirectory) {
		this.rootOutputDirectory = rootOoutputConfigurationDirectory;
	}
	
	

	
	
}
